package ${basePkg}.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ${basePkg}.dao.I${className}DAO;
import ${basePkg}.domain.${className};
import ${basePkg}.query.QueryObject;
import ${basePkg}.service.I${className}Service;

@Service("${objectName}Service")
public class ${className}ServiceImpl implements I${className}Service {

	@Autowired
	private I${className}DAO ${objectName}DAO;
	
	@Override
	public void save(${className} obj) {
		${objectName}DAO.save(obj);
	}

	@Override
	public void update(${className} obj) {
		${objectName}DAO.update(obj);
	}

	@Override
	public void delete(Long id) {
		${objectName}DAO.delete(${objectName}DAO.get(id));
		
	}

	@Override
	public ${className} get(Long id) {
		return ${objectName}DAO.get(id);
	}

	@Override
	public List<${className}> list() {
		return ${objectName}DAO.list();
	}

	@Override
	public List<${className}> query(QueryObject qo) {
		return ${objectName}DAO.query(qo);
	}
}
